package com.HaFuManShu2;

public class Node<T> {
     T data;
     double weight;
     int parent;
     int lchild;
     int rchild;
     public Node(T d,double w,int p,int l,int r){
         data = d;
         weight = w;
         parent = p;
         lchild = l;
         rchild = r;
     }

    public Node() {
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public int getParent() {
        return parent;
    }

    public void setParent(int parent) {
        this.parent = parent;
    }

    public int getLchild() {
        return lchild;
    }

    public void setLchild(int lchild) {
        this.lchild = lchild;
    }

    public int getRchild() {
        return rchild;
    }

    public void setRchild(int rchild) {
        this.rchild = rchild;
    }
}
